-
Notifications
You must be signed in to change notification settings - Fork 106
feat(AggLayer): Solidity compatibility tests for MMR frontier code #2312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: andrew-keccak-based-mmr-frontier
Are you sure you want to change the base?
feat(AggLayer): Solidity compatibility tests for MMR frontier code #2312
Conversation
into leaf<>root<>count paris; and canonical zeros
crates/miden-agglayer/solidity-compat/test/MMRTestVectors.t.sol
Outdated
Show resolved
Hide resolved
crates/miden-agglayer/solidity-compat/test/MMRTestVectors.t.sol
Outdated
Show resolved
Hide resolved
crates/miden-agglayer/solidity-compat/test/MMRTestVectors.t.sol
Outdated
Show resolved
Hide resolved
partylikeits1983
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Only comment is to remove console.log()s from tests & to use foundry cheatcode instead of doing string manipulation in solidity :)
PhilippGackstatter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I reviewed the structure and the Rust tests, but can't comment too much on Solidity code.
As suggested here, we're getting to a stage with the AggLayer integration where we should check for compatibility with the Solidity implementation.
This PR adds a small foundry project inside the
miden-agglayercrate:forgecommands to generate the test vectors. The vectors are generated by calling the Solidity functions of interest_addLeaf&getRootmake generate-solidity-test-vectorscommand to locally re-generate the test filesKeccakMmrFrontier32(currently we're not comparing with the output of MASM, since we independently already have Rust<>MASM compatibility test, so by extension we have Solidity<>MASM compat)To be done in a follow-up PR:
miden-testing/agglayercode intomiden-agglayercrate. Otherwise, the Rust compat test (located inmiden-testingdepends on the test vectors which are generated in a different crate (miden-agglayer)